﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace S8_EF
{
    public class TZ1989DBContext:DbContext
    {
        private string _ConnString = string.Empty;

        public TZ1989DBContext(string connString) 
        { 
            _ConnString= connString;
        }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlServer(_ConnString);
        }

        public IDbContextTransaction BeginTransaction()
        {
            return this.Database.BeginTransaction();
        }

        

        public DbSet<Base_User> Base_User { get; set; }
    }
}
